#pragma once

#include <gtl/type/type.h>

namespace gtl
{

namespace type
{

template<int index, class P1, class P2 = void_, class P3 = void_, class P4 = void_, class P5 = void_, 
					class P6 = void_, class P7 = void_, class P8 = void_, class P9 = void_>
struct selector;

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<1, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P1 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<2, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P2 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<3, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P3 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<4, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P4 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<5, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P5 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<6, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P6 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<7, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P7 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<8, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P8 type;
};

template<class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8, class P9>
struct selector<9, P1, P2, P3, P4, P5, P6, P7, P8, P9>
{
	typedef P9 type;
};

} // end of namespace type

} // end of namespace gtl